<template>
    <div>
        <van-nav-bar title="提交订单" left-text="返回" left-arrow @click-left="onClickLeft" />
        <van-address-list v-model="chosenAddressId" :list="list" default-tag-text="默认" style=" padding: 10px" />
        <van-card v-for="item in goodsList" :num="item.number" :price="item.retail_price" :title="item.goods_name"
            :thumb="item.list_pic_url" />
            
    </div>
</template>

<script>
import { billing } from "@/api/ShoopingCart/ShoopingCart"
export default {
    name: 'BusinessShoppingSettlement',
    data() {
        return {
            chosenAddressId: '1',
            list: [
                {
                    id: '1',
                    name: '张三',
                    tel: '13000000000',
                    address: '浙江省杭州市西湖区文三路 138 号东方通信大厦 7 楼 501 室',
                    isDefault: true,
                }
            ],
            goodsList: [],

        }
    },

    mounted() {
        
    },

    methods: {
        onClickLeft() {
            this.$router.replace('/ShoppingCart')
        },
        async GObilling() {
            const { data: res } = await billing()
            this.goodsList = res.goodsList
            console.log(this.goodsList);
        }
    },
    created() {
        this.GObilling()
    }
};
</script>

<style lang="less" scoped>
.van-address-list__bottom {
    display: none;
}
</style>